<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		<a href="login.html">登录</a>
		<a href="register.html">注册</a>
		<h1>首页</h1>
		//城市列表
		<div class="cityList">
			
		</div>
		
	</body>
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	<script type="text/javascript">
		//获取所有城市
		function getAllCity(){
			$.ajax({
				type:"get",
				url:"http://120.48.109.174:8081/area/city?level=1",
				async:true,
				success:function(res){
					console.log(res)
					$.each(res.body, function(index,item) {
						if(item.label=="北京"){
							$(".cityList").append("<span data-v="+item.value+">"+item.label+"</span>")
						}
						
					});
				}
			});
		}
		getAllCity()
		
	</script>
</html>
